package com.vcc.msc.sbs.proxy;

import java.util.List;

import android.util.Log;

import com.vcc.msc.sbs.common.RequestMethodType;
import com.vcc.msc.sbs.entity.VersionEntity;

public class VersionProxyService extends RESTClientProxyService implements
		VersionProxy {

	private static VersionProxyService instance = null;

	private VersionProxyService() {
		super();
	}

	public static VersionProxyService getInstance() {
		if (instance == null) {
			instance = new VersionProxyService();
		}
		return instance;
	}

	public List<VersionEntity> getVersionDetails(String typeCode, String version) {
		Log.d(this.getClass().getName(), "Before Connection");

		String xml = null;

		addParam("typeCode", "3521");
		addParam("versionNo", VERSION);

		try {
			xml = execute(GET_VERSION_DETAILS, RequestMethodType.GET);
		} catch (Exception e) {
			e.printStackTrace();
		}

		return VersionEntity.deserialize(xml);

	}

}
